﻿package callback;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

import util.KPrintInfo;

public class CallBackCenter {
	static private CallBackCenter	callBackCenter;
	
	private Map						callMap	= new HashMap();
	
	static public CallBackCenter getInstance() {
		if (callBackCenter == null) {
			callBackCenter = new CallBackCenter();
		}
		return callBackCenter;
	}
	
	public void deleteCallBack(String key) {
		callMap.remove(key);
	}
	
	// end class
	
	/**
	 * 
	 * @param keyString
	 *            键值
	 * @param classExp
	 *            实例
	 */
	public void registerCallBack(String keyString, Object classExp) {
		callMap.put(keyString, classExp);
	}
	
	public Object getClass(String keyString) {
		return callMap.get(keyString);
	}
	
}
